package com.yjt.javatest.entity;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {

    @TableId(type= IdType.AUTO)
    private Long userId;
    private String username;//用户名

    private String name;//姓名

    private String password;

    private String schoolId;//学工号

    @JsonIgnore
    private String created_at;

    @JsonIgnore
    private String updated_at;
    @EnumValue
    private UserType type;

    @TableLogic
    @JsonIgnore
    private Boolean isDeleted;

    /**
     * 邮箱 现在用不上
     */
    private String email;
    /**
     * 手机号
     */
    private String phoneNumber;

    public User(String password, String schoolId) {
        this.password = password;
        this.schoolId = schoolId;
    }

}
